package com.lang.tostring;

public class Test {
	public static void main(String[] args) {
		
	Person p= new Person(101, "dilip");
System.out.println(p);
	}

}
class Person{
	int id;
	String name;
	//public Person() {}
	public Person(int id, String name) {

		this.id = id;
		this.name = name;
	}
	public String toString(){
		String str= "ID\t :"+ id +"Name\t :"+name;
		
		String nm = this.getClass().getName();
		//int hc = this.hashCode();
		String hx = Integer.toHexString(hashCode());
		String msg = nm+"@"+hx; 
		return msg;
	}
	
}
